#!/bin/bash

# 设置MySQL root密码
mysql -u root < set_password.sql

# 创建数据库和表
mysql -u root -p123456 < setup.sql

# 安装Node.js依赖
npm install

# 启动数据同步
node sync_historical_data.js > sync.log 2>&1 &

echo "Setup completed. Check sync.log for synchronization progress." 